<template>
  <div>
    <el-row :gutter="50">
      <el-col :span="8">
        <div class="statistic">
          <el-statistic title="通讯录总数" :value="props.collectData.fileCount" />
        </div>
      </el-col>
      <el-col :span="8">
        <div class="statistic">
          <el-statistic title="底料总数" :value="props.collectData.baseMaterialCount" />
        </div>
      </el-col>
      <el-col :span="8">
        <div class="statistic">
          <el-statistic
            title="设备总数"
            :value="props.collectData.equipmentCount"
          />
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script setup>
const props = defineProps({
  collectData: {
    type: Object,
    required: false,
    default: () => {},
  },
});
</script>

<style lang="scss" scoped>
.statistic {
  text-align: center;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100px;
  background-color: white; /* 或其他背景色 */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* 添加阴影 */
}
::v-deep .el-statistic__head {
  font-size: 16px;
}
.el-statistic {
  --el-statistic-content-font-size: 28px;
}
.statistic-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--el-text-color-regular);
  margin-top: 5px;
}

.statistic-footer .footer-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.statistic-footer .footer-item span:last-child {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
}
.green {
  color: var(--el-color-success);
}
.red {
  color: var(--el-color-error);
}
</style>